/*
 * ledmatrix.h
 *
 *  Created on: Mar 09, 2010
 *      Author: Orlando Arias
 *	   License: GPLv3
 *
 *   libLEDMatrix for Arduino systems
 *   Copyright (C) 2010  Orlando Arias
 *
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */


#ifndef LEDMATRIX_H_
#define LEDMATRIX_H_

#include <inttypes.h>

#define LMX_SREG_PROP_DELAY	1
#define LMX_SREG_CLK_DELAY 1

typedef struct _ledmatrix {
	uint8_t data_in;	// serial data in
	uint8_t clk;		// clock
} ledmatrix;

void lmx_init(ledmatrix *l);					// initializes matrix
void lmx_sendData(ledmatrix *l, uint8_t data);	// send data to matrix
inline void lmx_clearSreg(ledmatrix *l);		// clear shift register

#endif /* LEDMATRIX_H_ */
